package com.jacen.aws.util;

import javax.swing.*;
import java.awt.*;

/**
 * 版权声明：Copyright(c) 2018 All Rights Reserved.
 *
 * @Author Jacen (295117485@qq.com)
 * @Date 2018/10/13 8:37
 * @Version 1.0
 * @Description dialog 工具类
 */
public class DialogUtil {
    /**
     * 错误提示
     *
     * @param parent
     * @param message
     */
    public static void showErrorDialog(Component parent, String message) {
        JOptionPane.showMessageDialog(parent, message, "错误提示", JOptionPane.ERROR_MESSAGE);
    }

    /**
     * 显示提示信息框
     *
     * @param parent
     * @param message
     */
    private static void showMessage(Component parent, String message) {
        JOptionPane.showMessageDialog(parent, message, "提示", JOptionPane.PLAIN_MESSAGE);
    }
}
